<?php
class LoginService
{
	private $username;
	private $password;
	/**
	 * 登陆验证
	 * @Author   Leikes
	 * @DateTime 2016-01-08T17:34:08+0800
	 * @return   array                   错误代码
	 */
	public function loginCheck()
	{
		if (!Auth::attempt(array('username' => $this->username, 'password' => $this->password)))
		{
			return CMSException::$loginErr;
		}
		return CMSException::$ok;
	}

	public function setUsername($username)
	{
		$this->username=trim($username);
	}

	public function setPsssword($password)
	{
		$this->password=trim($password);
	}
}